
; #CURRENT# ----------------------------------------------
; Func_Upgrade
;---------------------------------------------------------

; #Function# ---------------------------------------------
; Name...........: Func_Upgrade
; Description ...: Upgrade DiskSafe
; Parameters ....:
; Return values .: NA
;----------------------------------------------------------

#cs
;Test_S
#include <Variable.au3>
#include <Func.au3>
Func_Upgrade($G_DSexePath,$G_DSexeName)
;Test_E
#ce



Func Func_Upgrade($DSexeLocation,$DSexe)

	;MsgBox(0,"","Func_Upgrade IN ")

	_log("Func_Upgrade() IN")
	_log("$DSexeLocation: " & $DSexeLocation)
	_log("$DSexe: " & $DSexe)

	Run($DSexeLocation & $DSexe)						;ex:C:\DiskSafe-3.62-201-IMA-2.50-376-falcon.exe

	$G_title_Upgrade	=	"DiskSafe Installation"
	$G_text_Install		=	"&Yes"						;i.e. "You must restart your system"

	WinWait($G_title_Upgrade, $G_text_Install)
	WinActivate($G_title_Upgrade, $G_text_Install)
	WinWaitActive($G_title_Upgrade, $G_text_Install)
	ControlClick ($G_title_Upgrade, "&Yes", 6)	 		;Click "Yes" to reboot

	_log("Func_Upgrade() OUT")

	Shutdown(6)

EndFunc


